package cn.xiyun.xiyuncc.web.controller;

import cn.xiyun.xiyuncc.result.JSONResult;
import cn.xiyun.xiyuncc.service.ITokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/token")
public class TokenController {
    @Autowired
    private ITokenService tokenService;

    @RequestMapping("/createToken/{ids}")
    public JSONResult createToken(@PathVariable("ids") String ids) {
        String token = tokenService.createToken(ids);
        return JSONResult.success(token);
    }
}
